<%@ page language="java" pageEncoding="utf-8"%>
<%@include file="model_file.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>###</title>
		<link href="images/style.css" rel="stylesheet" type="text/css">
		<style type="text/css">
		.redTip{
			color:red;
		}
		.editTbl td{
			padding:2px 2px 2px 4px;
			height:25px;
		}
		.inputitem{
			width:150px;
		}
		</style>
		<script type="text/javascript">
		     function ValidateForm(theform){
		        if(theform.content.value==""){
		            alert("文件内容不能为空!");
		            theform.content.focus();
		            return false;
		        }
		    }
		</script>
	</head>
	<body topmargin="20" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#EDF4FD">
			<table width="95%" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td class="title">
					&nbsp;&nbsp;<a href="article_index.jsp?act=ilist"><%=current.get("DWMC")%></a> 
					-&gt; <a href="file_list.jsp?act=list">模板</a> 
					<%for(DbMap crumb : crumbs){ %>
					<%if(!Util.empty(crumb.get("NAME"))){%>
					-&gt; <a href="file_list.jsp?act=list&path=<%=crumb.get("PATH")%>"><%=crumb.get("NAME")%></a> 
					<%}}%>
					-&gt; <%=params.get("file") %>
					</td>
					<td width="80" class="title" align="right">
					</td>
				</tr>
				<tr>
					<td height="2"></td>
				</tr>
				<tr>
				<td height="22" class="title_td" colspan="2">
					&nbsp;
					<a href="file_list.jsp?act=list&path=<%=params.get("path") %>">列表</a> |&nbsp;
					<font color="#FF0000">修改文件</font>
				</td>
				</tr>
			</table>
			<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td valign="top" style="padding-top:5px">
					<br/>
					<form action="file_update.jsp?act=doupdate<%=params.query("path,file")%>" method="post" onsubmit="return ValidateForm(this)">
					<table width="100%" border=0 cellpadding=0 cellspacing=1 align="center" bgcolor="#809BB9" class="editTbl" style="margin-top:2px;">
					<tr bgcolor="#CEDDF0">
						<td height="28" style="font-weight:bold;" align="left">
							内容：
						</td>
					</tr>
					<tr bgcolor="#ffffff">
						<td align="center">
						<textarea name="content" cols="60" rows="24" style="width:98%;margin:4px;font-size:12px;"><%=fileContent%></textarea>
						</td>
					</tr>
					</table>
					<br/>
					<br/>
					<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
						<tr>
							<td colspan="3" align="center">
								&nbsp;&nbsp;&nbsp;&nbsp;
								<%if(operations.indexOf("|2003,update|") != -1 || "1".equals(current_userid)){%>
								<input type="submit" class="inputbox2" value=" 提 交 ">
								<%} %>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="button" class="inputbox2" value=" 返 回 " onclick="location='file_list.jsp?act=list&path=<%=params.get("path")%>'">
								<br>
								<br>
							</td>
						</tr>
					</table>
					</form>
					<br/>
					<br/>
				</td>
			</tr>
		</table>
		<%if(!msg.emptyMessage()){%>
		<script type="text/javascript">
		alert('<%=msg.getMessage()%>');
		</script>
		<%}%>
		<%if(msg.getIsSuccess()){ %>
		<script type="text/javascript">
		location.href='file_list.jsp?act=list&path=<%=params.get("path")%>';
		</script>
		<%} %>
	</body>
</html>